<html>
<head><meta charset="utf-8"><title>rustc --print native-static-libs · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustc.20--print.20native-static-libs.html">rustc --print native-static-libs</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="166357337"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustc%20--print%20native-static-libs/near/166357337" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustc.20--print.20native-static-libs.html#166357337">(May 23 2019 at 12:52)</a>:</h4>
<p>what's the sanest way to not litter the directory with libnull.a when just asking rustc the static-libs ?</p>



<a name="166364622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustc%20--print%20native-static-libs/near/166364622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustc.20--print.20native-static-libs.html#166364622">(May 23 2019 at 14:18)</a>:</h4>
<p>looks like a bug? <code>rustc --print sysroot</code> does not create a <code>libnull.a</code></p>



<a name="166373169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustc%20--print%20native-static-libs/near/166373169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustc.20--print.20native-static-libs.html#166373169">(May 23 2019 at 15:45)</a>:</h4>
<p>Oh, I just recently documented that flag, I think that's intentional that it will perform a full compilation. Historically it was always displayed during compilation, and it was changed to only display the link list with the <code>--print</code> flag. I think it is geared towards "you just built a staticlib, here's how you can link it". And some people didn't like that it <em>always</em> printed it, so it was changed to a flag. Also, presumably, the answer isn't known until translation phase.  It's definitely an odd flag, as it's the only one that doesn't stop compilation.</p>



<a name="166569665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustc%20--print%20native-static-libs/near/166569665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustc.20--print.20native-static-libs.html#166569665">(May 26 2019 at 10:40)</a>:</h4>
<p>If is this behavior is set and intentional I can try to workaround it</p>



<a name="166569668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustc%20--print%20native-static-libs/near/166569668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustc.20--print.20native-static-libs.html#166569668">(May 26 2019 at 10:40)</a>:</h4>
<p>Otherwise I'd change it</p>



<a name="166569675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/rustc%20--print%20native-static-libs/near/166569675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Luca Barbato <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/rustc.20--print.20native-static-libs.html#166569675">(May 26 2019 at 10:40)</a>:</h4>
<p>since it is really brittle</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>